<?php
/**
 * @var $model User
 * @var $this UserController
 */
$this->breadcrumbs = array(
    'Tài khoản' => array('profile'),
    "Sửa",
);
$this->pageTitle = $model->username." | Thay đổi thông tin cá nhân";
?>
<style type="text/css">
    #User_sex label{display: inline}
</style>
<div class="form">
    <h2 style="background:#EFB632;color: #000;padding: 3px 0px 3px 20px;font-size: 13px;font-weight: bold">Sửa thông tin tài khoản</h2>
    <?php
    /**
     * @var $form CActiveForm
     */
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'user-form',
        'enableAjaxValidation' => false,
    )); ?>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'display_name'); ?>
        <?php echo $form->textField($model, 'display_name', array('size' => 60, 'maxlength' => 150)); ?>
        <?php echo $form->error($model, 'display_name'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'birthday'); ?>
        <?php
        //echo $form->textField($model, 'birthday', array('size' => 60, 'maxlength' => 150));
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'name' => 'User[birthday]',
            'language' => 'vi',
            'value' => $model->birthday ? date('d/m/Y',$model->birthday) : '',
            // additional javascript options for the date picker plugin
            'options' => array(
                'showAnim' => 'fold',
                'changeMonth' => true,
                'changeYear' => true
            ),
        ));
        ?>
        <?php echo $form->error($model, 'birthday'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'sex'); ?>
        <?php echo $form->radioButtonList($model, 'sex', array(1 => 'Nam', 2 => 'Nữ')); ?>
        <?php echo $form->error($model, 'sex'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'tel'); ?>
        <?php echo $form->textField($model, 'tel', array('size' => 60, 'maxlength' => 150)); ?>
        <?php echo $form->error($model, 'tel'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'address'); ?>
        <?php echo $form->textField($model, 'address', array('size' => 60, 'maxlength' => 150)); ?>
        <?php echo $form->error($model, 'address'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'home_page'); ?>
        <?php echo $form->textField($model, 'home_page', array('size' => 60, 'maxlength' => 150)); ?>
        <?php echo $form->error($model, 'home_page'); ?>
    </div>
    <div class="row buttons">
        <?php echo CHtml::submitButton('Lưu'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->